﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Web;

namespace KC.Presentation.ModuTweet
{
	public partial class ModuTweet : Form
	{
		public DebugConsole dConsole = null;

		public ModuTweet()
		{
			InitializeComponent();
		}

		public void debug(string msg)
		{
			if (dConsole == null) dConsole = new DebugConsole();
			
		}

		private void debugConsoleToolStripMenuItem_Click(object sender, EventArgs e)
		{
			if (dConsole == null) dConsole = new DebugConsole();
			dConsole.Show(this);
			dConsole.Focus();
		}

		private void button1_Click(object sender, EventArgs e)
		{
			dConsole.debug(KC.Business.ModuTweet.Lookups.GetTimeline("tsilb", 5, true, true));
			Authenticate(txtUser.Text, txtPass.Text);
		}

		private void Authenticate(string user, string password)
		{
			// Retrieve request token
			string RequestTokenURL = @"http://api.twitter.com/oauth/request_token";
			string AuthorizeURL = @"https://api.twitter.com/oauth/authorize";
			string AccessTokenURL = @"https://api.twitter.com/oauth/access_token";
			string ConsumerSecret = @"mkhws7kct5NsxP4FLMwmNhSqW14FigSttcc454IRQQ";
			string AccessToken = @"6325332-BZDNObBWsL5J4sbl3F0QEYHjFCIFcOZEmtP20MIK3E";
			string AccessTokenSecret = @"uRRIfrLgqzHutTXIWMrSPcZjxV5t5yYSxpNmXQ0";

			string ActualRequestTokenUrl = "POST&" + HttpUtility.UrlEncode(@"https://api.twitter.com/1/"+"&");





			// Request user authorization


			// Exchange request token for access token


			// Return access token



		}


	}
}
